//
//  MyLatLng.m
//  SelfDriving
//
//  Created by apple on 15/12/1.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "MyLatLng.h"

@implementation MyLatLng
-(void)initData:(double)latitude ln:(double)longitude{
    _m_LoDeg=(int)longitude;
    _m_LoMin=(int)((longitude-_m_LoDeg)*60);
    _m_LoSec=(longitude-_m_LoDeg-_m_LoMin/60.)*3600;
    
    _m_LaDeg=(int)latitude;
    _m_LaMin=(int)((latitude-_m_LaDeg)*60);
    _m_LaSec=(latitude-_m_LaDeg-_m_LaMin/60.)*3600;
    
    _m_Longitude=longitude;
    _m_Latitude=latitude;
    _m_RadLo=longitude*M_PI/180.;
    _m_RadLa=latitude*M_PI/180.;
    _Ec=Rj+(Rc-Rj)*(90.-_m_Latitude)/90.;
    _Ed=_Ec*cos(_m_RadLa);
}
@end
